package kr.hkit.powerjava.chapter26.Young2;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.Properties;
import java.util.Scanner;

public class TestMainChu2 {
	public static void main(String[] args) {
		
		Connection connection = ConnectionFactory.getConnection();
		Scanner sc = new Scanner(System.in);
		
		ServiceDepartment deptSvc = new ServiceDepartment(sc, connection);
		deptSvc.prnMenu();
		 
		 try {
			connection.close();
		} catch (SQLException e) {
			e.printStackTrace();
		}
		
		/*
		String driver = "com.mysql.jdbc.Driver";
		String url = "jdbc:mysql://localhost:3306/mysql_study";
		String user = "root";
		String password = "1111";
		
		DBProperties.saveProperties("dbcon2.xml", driver,url,user,password);
		*/
		
		/*
		//콘솔에 출력 테스트용
		Properties prop = DBProperties.loadProperties("dbcon2.xml");
		System.out.println(prop);
		*/
		
		/*
		//연결 테스트
		Connection con = ConnectionFactory.getConnection();
		System.out.println(con);
		 */
		
	}
}
